package com.szj.service.impl;

import com.szj.entity.Clazz;
import com.szj.entity.LoginForm;
import com.szj.entity.Teacher;
import com.szj.mapper.TeacherMapper;
import com.szj.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherMapper teacherMapper;

    /**
     * 教师登录
     * @param loginForm
     * @return
     */
    @Override
    public Teacher login(LoginForm loginForm) {
        return teacherMapper.login(loginForm);
    }

    @Override
    public int teacherDel(Integer[] ids) {
        return teacherMapper.teacherDel(ids);
    }

    @Override
    public int updatePassword(Teacher teacher) {
        return teacherMapper.updatePassword(teacher);
    }

    @Override
    public List<Teacher> selectList(Teacher teacher) {
        return teacherMapper.selectList(teacher);
    }

    @Override
    public Teacher findByName(String name) {
        return teacherMapper.findByName(name);
    }

    @Override
    public int teacherAdd(Teacher teacher) {
        return teacherMapper.teacherAdd(teacher);
    }

    @Override
    public int teacherUp(Teacher teacher) {
        return teacherMapper.teacherUp(teacher);
    }
}